<%@ page contentType="text/html; charset=utf-8" language="java"
	errorPage=""%>
<%@include file="../include/jspheader.jsp"%>
<head>
<title>EpowerWordForDay列表</title>
<script type="text/javascript"
	src="<s:url value="/js/formValidator3.5.js" includeParams="none"/>"
	charset="UTF-8"></script>
<script src="<s:url value="/js/common.js" includeParams="none"/>"></script>
<script>
$(document).ready( function() {
	$.formValidator.initConfig();
	
			$('#spelling').formValidator().functionValidator( {
				fun : function(val, elem) {
					$(elem).val($.trim(val));
				}
			});
			$('#content').formValidator().functionValidator( {
				fun : function(val, elem) {
					$(elem).val($.trim(val));
				}
			});
			$('#showtime').formValidator().functionValidator( {
				fun : function(val, elem) {
					$(elem).val($.trim(val));
				}
			});
			$('#rank').formValidator().functionValidator( {
				fun : function(val, elem) {
					$(elem).val($.trim(val));
				}
			});
			$('#rating').formValidator().functionValidator( {
				fun : function(val, elem) {
					$(elem).val($.trim(val));
				}
			});
			$('#status').formValidator().functionValidator( {
				fun : function(val, elem) {
					$(elem).val($.trim(val));
				}
			});
	
});


function doSearch(flag) {
	$('#searchform').submit();
	return true;
}

function funReset() {
	        $("#id").val("");
			$("#spelling").val("");
			$("#content").val("");
			$("#showtime").val("");
			$("#rank").val("");
			$("#rating").val("");
			$("#status").val("");
}
function doDelete(id) {
	document.getElementById("searchform").action="deleteEpowerWordForDay.action?id="+id;
	document.getElementById("searchform").submit();	
}
</script>
<style type="text/css">
.tb1 th,.tb1 td {
	padding: 2px 5px;
}

.break {
	table-layout: fixed;
	word-wrap: break-word;
	word-break: break-all;
	color: #f00;
}

.online td{color:black;}
.offline td{color:blue;}
.deleted td{text-decoration: line-through;color:gray;}

</style>
</head>
<body>

<s:form id="searchform" name="searchform" method="post" namespace="/epowerwordforday"
	action="listEpowerWordForDay" theme="simple">
	<div id="sa" class="sa2 p10 mb10">	
	<table>
		</tr>
				<th width="120">单词拼写 ：</th>
				<td width="300"><input type="text" class="sa_w_tx" id="content"
					name="query.spelling" value="<s:property value="query.spelling"/>" />
				</td>
				<th width="120">展示的时间 ：</th>
				<td width="300"><input type="text" class="sa_w_tx" id="showtime"
					name="query.showtime" value="<s:property value="query.showtime"/>" />
				</td>
		<tr>
		</tr>
				<th width="120">推荐级别 ：</th>
				<td width="300"><input type="text" class="sa_w_tx" id="rating"
					name="query.rating" value="<s:property value="query.rating"/>" />
				</td>
		<tr>
		</tr>
				<th width="120">状态 ：</th>
				<td width="300"><input type="text" class="sa_w_tx" id="status"
					name="query.status" value="<s:property value="query.status"/>" />
				</td>
		</tr>
		<tr>
			<th></th>
			<td><input type="button" value="查询" class="btn1"
				onclick="initPageNum(); doSearch('new')" /><input id="btnreset"
				type="button" value="重置" class="btn1" onclick="funReset();" /></td>
			<th></th>
			<td><font color="#FF0000">
			<div id="diverror"><s:fielderror id="fielderror" /></div>
			</font></td>
		</tr>
	</table>
	</div>
	<div style="text-align: center; color: red;"><s:actionmessage />
	</div>
	<div class="mb10 sa2 p10">
	<div id="msg"></div>
	</div>

	<div id="sr" class="b1 mb10">
	<table width="100%">
		<tr>
			<td>
			<ul id="sr_bq">
				<li class="on">
				<div>EpowerWordForDay列表</div>
				</li>
			</ul>
			<dl id="sr_cz">
				<dt
					onclick="window.location='<s:url namespace="/epowerwordforday" action="viewAddEpowerWordForDay"/>'">
				<div><img src="<s:url value="/images/icon_user_edit.gif"/>"
					width="16" height="16" align="absmiddle" vspace="7" /> 新增</div>
				</dt>
			</dl>
			<table width="100%" border="1" bordercolor="#d0d0d0" class="tb1"
				id="dgbg" bgcolor="#ffffff" style="word-break:break-all">
				<thead>
					<tr>
						<th width="">ID</th>
						<th width="">单词拼写</th>
						<th width="">类型</th>
						<th width="">div的内容</th>
						<th width="">展示的时间</th>
						<th width="">单词次序</th>
						<th width="">推荐级别</th>
						<th width="">状态</th>
						<th width="">所属组</th>
						<th width="">创建时间</th>
						<th width="">更新时间</th>
					<th width="">操作</th>
				</thead>
				<tbody>
					<s:iterator value="epowerWordForDayList">
						<tr>
							<td class="nowrap" width=""><s:property value="id" /></td>
							<td class="nowrap" width=""><s:property value="spelling" /></td>
							<td class="nowrap" width="">
							<s:if test="%{main==1}">
							    主词
                            </s:if>
                            <s:else>
                                                                                 派生词
                            </s:else>
							</td>
							<td class="nowrap" width=""><s:property value="content" /></td>
							<td class="nowrap" width=""><s:property value="showtime" /></td>
							<td class="nowrap" width=""><s:property value="rank" /></td>
							<td class="nowrap" width=""><s:property value="rating" /></td>
							<td class="nowrap" width=""><s:property value="status" /></td>
							<td class="nowrap" width=""><s:property value="groupid" /></td>
						    <td class="nowrap" width=""><s:date name="createtime" format="yyyy-MM-dd hh:mm:ss" /></td>
						    <td class="nowrap" width=""><s:date name="updatetime" format="yyyy-MM-dd hh:mm:ss" /></td>
							<td class="nowrap" width="">
							<a href="<s:url namespace="/epowerwordforday" action="viewEditEpowerWordForDay"><s:param name="id" value="id"/><s:param name="refer" value="#return"/></s:url>">编辑</a> |  <a style="cursor:pointer" onclick=doDelete("<s:property value='id' />")>删除</a> 
							</td>
						</tr>
					</s:iterator>
				</tbody>
			</table>
			<%@ include file="../commons/pageNav.jsp"%></td>
		</tr>
	</table>
	</div>
</s:form>
</body>